﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Runtime.Design;

namespace SSISTransferLoginsTask
{
    /// <summary>
    /// Class that will be used to provide the Design Time window to change the properties of this task
    /// </summary>
    public class CopyLoginsUI : IDtsTaskUI
    {
        // Container encapsulate a task
        private TaskHost _TaskHost;
        private IServiceProvider _ServiceProvider;
        #region IDtsTaskUI Members
        /// <summary>
        /// Called when the editing of the task is finished, can be used to clean up resources
        /// </summary>
        /// <param name="parentWindow"></param>
        public void Delete(System.Windows.Forms.IWin32Window parentWindow)
        {
            
        }
        /// <summary>
        /// Called by SSIS to get the Forms window that allow you to modify the properties 
        /// of the package
        /// </summary>
        /// <returns>The Forms window that represents the package editor</returns>
        public System.Windows.Forms.ContainerControl GetView()
        {
            return new CopyLoginsForm(_TaskHost,_ServiceProvider);
        }
        /// <summary>
        /// Called just before GetView(), allows you to save the TaskHost and
        /// service provider
        /// </summary>
        /// <param name="taskHost">Class that embed the real task instance</param>
        /// <param name="serviceProvider">Used to create for example connectionmgrs</param>
        public void Initialize(TaskHost taskHost, IServiceProvider serviceProvider)
        {
            _TaskHost = taskHost;
            _ServiceProvider = serviceProvider;
        }

        public void New(System.Windows.Forms.IWin32Window parentWindow)
        {
            
        }

        #endregion
    }
}
